Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.

Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

2NDSNEG(s(N), cons2(X, cons(Y, Z))) → 2NDSPOS(N, activate(Z))
2NDSPOS(s(N), cons2(X, cons(Y, Z))) → ACTIVATE(Z)
2NDSNEG(s(N), cons2(X, cons(Y, Z))) → ACTIVATE(Z)
ACTIVATE(n__from(X)) → FROM(X)
SQUARE(X) → TIMES(X, X)
PI(X) → FROM(0)
2NDSPOS(s(N), cons(X, Z)) → 2NDSPOS(s(N), cons2(X, activate(Z)))
PI(X) → 2NDSPOS(X, from(0))
PLUS(s(X), Y) → PLUS(X, Y)
TIMES(s(X), Y) → PLUS(Y, times(X, Y))
TIMES(s(X), Y) → TIMES(X, Y)
2NDSPOS(s(N), cons2(X, cons(Y, Z))) → 2NDSNEG(N, activate(Z))
2NDSNEG(s(N), cons(X, Z)) → 2NDSNEG(s(N), cons2(X, activate(Z)))
2NDSNEG(s(N), cons(X, Z)) → ACTIVATE(Z)
2NDSPOS(s(N), cons(X, Z)) → ACTIVATE(Z)

The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

2NDSNEG(s(N), cons2(X, cons(Y, Z))) → 2NDSPOS(N, activate(Z))
2NDSPOS(s(N), cons2(X, cons(Y, Z))) → ACTIVATE(Z)
2NDSNEG(s(N), cons2(X, cons(Y, Z))) → ACTIVATE(Z)
ACTIVATE(n__from(X)) → FROM(X)
SQUARE(X) → TIMES(X, X)
PI(X) → FROM(0)
2NDSPOS(s(N), cons(X, Z)) → 2NDSPOS(s(N), cons2(X, activate(Z)))
PI(X) → 2NDSPOS(X, from(0))
PLUS(s(X), Y) → PLUS(X, Y)
TIMES(s(X), Y) → PLUS(Y, times(X, Y))
TIMES(s(X), Y) → TIMES(X, Y)
2NDSPOS(s(N), cons2(X, cons(Y, Z))) → 2NDSNEG(N, activate(Z))
2NDSNEG(s(N), cons(X, Z)) → 2NDSNEG(s(N), cons2(X, activate(Z)))
2NDSNEG(s(N), cons(X, Z)) → ACTIVATE(Z)
2NDSPOS(s(N), cons(X, Z)) → ACTIVATE(Z)

The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

2NDSNEG(s(N), cons2(X, cons(Y, Z))) → 2NDSPOS(N, activate(Z))
2NDSPOS(s(N), cons2(X, cons(Y, Z))) → ACTIVATE(Z)
2NDSNEG(s(N), cons2(X, cons(Y, Z))) → ACTIVATE(Z)
ACTIVATE(n__from(X)) → FROM(X)
PI(X) → FROM(0)
SQUARE(X) → TIMES(X, X)
2NDSPOS(s(N), cons(X, Z)) → 2NDSPOS(s(N), cons2(X, activate(Z)))
PLUS(s(X), Y) → PLUS(X, Y)
PI(X) → 2NDSPOS(X, from(0))
TIMES(s(X), Y) → PLUS(Y, times(X, Y))
TIMES(s(X), Y) → TIMES(X, Y)
2NDSNEG(s(N), cons(X, Z)) → ACTIVATE(Z)
2NDSNEG(s(N), cons(X, Z)) → 2NDSNEG(s(N), cons2(X, activate(Z)))
2NDSPOS(s(N), cons2(X, cons(Y, Z))) → 2NDSNEG(N, activate(Z))
2NDSPOS(s(N), cons(X, Z)) → ACTIVATE(Z)

The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 3 SCCs with 9 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
QDP
                ↳ QDPOrderProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PLUS(s(X), Y) → PLUS(X, Y)

The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


PLUS(s(X), Y) → PLUS(X, Y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
PLUS(x1, x2)  =  x1
s(x1)  =  s(x1)

Recursive Path Order [2].
Precedence:
trivial

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ PisEmptyProof
              ↳ QDP
              ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
QDP
                ↳ QDPOrderProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

TIMES(s(X), Y) → TIMES(X, Y)

The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


TIMES(s(X), Y) → TIMES(X, Y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
TIMES(x1, x2)  =  x1
s(x1)  =  s(x1)

Recursive Path Order [2].
Precedence:
trivial

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ PisEmptyProof
              ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

2NDSNEG(s(N), cons2(X, cons(Y, Z))) → 2NDSPOS(N, activate(Z))
2NDSNEG(s(N), cons(X, Z)) → 2NDSNEG(s(N), cons2(X, activate(Z)))
2NDSPOS(s(N), cons2(X, cons(Y, Z))) → 2NDSNEG(N, activate(Z))
2NDSPOS(s(N), cons(X, Z)) → 2NDSPOS(s(N), cons2(X, activate(Z)))

The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


2NDSNEG(s(N), cons2(X, cons(Y, Z))) → 2NDSPOS(N, activate(Z))
2NDSPOS(s(N), cons2(X, cons(Y, Z))) → 2NDSNEG(N, activate(Z))
The remaining pairs can at least be oriented weakly.

2NDSNEG(s(N), cons(X, Z)) → 2NDSNEG(s(N), cons2(X, activate(Z)))
2NDSPOS(s(N), cons(X, Z)) → 2NDSPOS(s(N), cons2(X, activate(Z)))
Used ordering: Combined order from the following AFS and order.
2NDSNEG(x1, x2)  =  2NDSNEG(x1)
s(x1)  =  s(x1)
cons2(x1, x2)  =  cons2
cons(x1, x2)  =  x1
2NDSPOS(x1, x2)  =  2NDSPOS(x1)
activate(x1)  =  activate(x1)
n__from(x1)  =  n__from(x1)
from(x1)  =  x1

Recursive Path Order [2].
Precedence:
s1 > 2NDSNEG1 > 2NDSPOS1
s1 > activate1
cons2 > 2NDSNEG1 > 2NDSPOS1
cons2 > activate1

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

2NDSNEG(s(N), cons(X, Z)) → 2NDSNEG(s(N), cons2(X, activate(Z)))
2NDSPOS(s(N), cons(X, Z)) → 2NDSPOS(s(N), cons2(X, activate(Z)))

The TRS R consists of the following rules:

from(X) → cons(X, n__from(s(X)))
2ndspos(0, Z) → rnil
2ndspos(s(N), cons(X, Z)) → 2ndspos(s(N), cons2(X, activate(Z)))
2ndspos(s(N), cons2(X, cons(Y, Z))) → rcons(posrecip(Y), 2ndsneg(N, activate(Z)))
2ndsneg(0, Z) → rnil
2ndsneg(s(N), cons(X, Z)) → 2ndsneg(s(N), cons2(X, activate(Z)))
2ndsneg(s(N), cons2(X, cons(Y, Z))) → rcons(negrecip(Y), 2ndspos(N, activate(Z)))
pi(X) → 2ndspos(X, from(0))
plus(0, Y) → Y
plus(s(X), Y) → s(plus(X, Y))
times(0, Y) → 0
times(s(X), Y) → plus(Y, times(X, Y))
square(X) → times(X, X)
from(X) → n__from(X)
activate(n__from(X)) → from(X)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 2 less nodes.